<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>

<include file="Public:aside"/>

    <section>
        <include file="Public:nav" />
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">新增管理</h4>                
                <a href="{:U('Admin/Vote/add')}" class="button on-right theme small icon plus" >新增投票</a>
            </div>            
            <hr />
            <div class="row margin-top">
                <volist name="volist" id="vo">
                <div class="info-box">
                <div class="column_2 bck light padding">
                    <notempty name="vo[picurl]" >
                        <img src="{$vo.picurl}">
                    <else/>
                        暂无图片          
                    </notempty>
                </div>
                <div class="column_6">
                    <h4>{$vo.title}</h4>
                    {$vo.intro|strip_tags|addslashes|cut=68}
                </div>
                <div class="column_1">
                    <a class="button theme tiny" href="{:U("Admin/Info/edit?id=$vo[id]")}">修改</a>
                    <a delete class="button tiny" href="{:U("Admin/Info/delete?id=$vo[id]")}">删除</a>
                </div>
                </div>
                </volist>
            </div>
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="Public/js/app.js" />
<script type="text/javascript">
$(function(){
    $('a[navid={$navid}]').addClass('active');
    $('a[delete]').on('click',function(e){
        e.preventDefault();
        TukTuk.Modal.loading();
        var obj = $(this);
        var url = $(this).attr('href');
        $.get(url,{},function(req){
            obj.parent().parent().hide('slow',function(){
                obj.parent().parent().remove();
                TukTuk.Modal.hide();
            });
        })
    })
})    
</script>
</html>
